<template>
  <div>
    <Header />
    <div>
      <van-form @submit="onSubmit">
        <van-field v-model="username"
                   name="手机号"
                   label="手机号"
                   placeholder="手机号"
                   :rules="[{ required: true, message: '请填写手机号' }]" />
        <van-field v-model="password"
                   type="password"
                   name="密码"
                   label="密码"
                   placeholder="密码"
                   :rules="[{ required: true, message: '请填写密码' }]" />
        <van-field v-model="password"
                   type="password"
                   name="确认密码"
                   label="确认密码"
                   placeholder="确认密码"
                   :rules="[{ required: true, message: '请填写确认密码' }]" />
        <div style="margin: 16px;">
          <van-button round
                      block
                      type="info"
                      native-type="submit">
            注册
          </van-button>
        </div>
      </van-form>
    </div>
  </div>
</template>

<script>
import Header from './components/HeaderRegister'
export default {
  name: 'Register',
  components: {
    Header
  },
  data() {
    return {
      username: '',
      password: ''
    }
  },
  methods: {
    onSubmit(values) {
      console.log('submit', values)
    }
  }
}
</script>

<style>
</style>
